<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改评分项配置')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-items-edit" th:object="${evaluationItems}">
            <input name="itemId" th:field="*{itemId}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">一级分类：</label>
                    <div class="col-sm-8">
                        <select name="firstLevelCategory" class="form-control" th:with="type=${@dict.getType('sys_pf_first')}" required>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{firstLevelCategory}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">二级分类：</label>
                    <div class="col-sm-8">
                        <input name="secondLevelCategory" th:field="*{secondLevelCategory}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">评分项名称：</label>
                    <div class="col-sm-8">
                        <input name="itemName" th:field="*{itemName}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">打分形式：</label>
                    <div class="col-sm-8">
                        <select name="scoringMethod" class="form-control" th:with="type=${@dict.getType('sys_pf_dafenxs')}" required>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{scoringMethod}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">分值配置：</label>
                    <div class="col-sm-8">
                        <input name="scoreConfig" th:field="*{scoreConfig}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">权重：</label>
                    <div class="col-sm-8">
                        <input name="weight" th:field="*{weight}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">是否客观分(0-是,1-否)：</label>
                    <div class="col-sm-8">
                        <select name="isObjective" class="form-control" th:with="type=${@dict.getType('sys_pf_iskg')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isObjective}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">指标评分标准：</label>
                    <div class="col-sm-8">
                        <textarea name="itemBz" class="form-control" required>[[*{itemBz}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">创建者：</label>
                    <div class="col-sm-8">
                        <input name="creator" th:field="*{creator}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">更新者：</label>
                    <div class="col-sm-8">
                        <input name="updater" th:field="*{updater}" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/items";
        $("#form-items-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-items-edit').serialize());
            }
        }
    </script>
</body>
</html>